package patterns.visitor;

/**
 * Created by thinkpad on 16-12-10.
 * 访问者类，不同的访问模式，实现不同的访问逻辑。
 */
public class ComputerPartDisplayVisitor implements ComputerPartVisitor{
    @Override
    public void visit(Computer computer) {
        System.out.println("显示Computer");
    }

    @Override
    public void visit(Keyboard keyboard) {
        System.out.println("显示Keyboard");

    }

    @Override
    public void visit(Monitor monitor) {
        System.out.println("显示Monitor");

    }

    @Override
    public void visit(Mouse mouse) {
        System.out.println("显示Mouse");

    }
}
